When you map a method, it has to conform to one of the following:
- A method (function) that has no arguments, and returns a value. This method can be used to obtain values from the target. It is equivalent to a property getter.
- A method that has one argument (return value is ignored and can be void). This method can be used to modify values in the target. It is equivalent to a property setter.
The method return type (in first case), or the method’s argument type (in second case) must be compatible with the type of data, as given by the mapping (see Mapping Kinds for details on types for different kinds of mappings).
See Also